package scene01_Home;

import android.graphics.Bitmap;
import android.graphics.Paint;
import android.widget.Toast;
import baseClass.Global;
import baseClass.Sprite_Touch;
import com.nPones.MainActivity;
import mainSrc.GlobalSaveData;
import mainSrc.MainDirector;

public class Sprite_ButtonOption
  extends Sprite_Touch
{
  private boolean bIsActive = true;
  private int iSortOfBtn = 0;
  
  public Sprite_ButtonOption(int paramInt1, int paramInt2, int paramInt3, float paramFloat1, float paramFloat2, int paramInt4)
  {
    super(paramInt1, paramInt2, paramInt3, paramFloat1, paramFloat2);
    this.iSortOfBtn = paramInt4;
  }
  
  public void SetButtonActive(boolean paramBoolean)
  {
    this.bIsActive = paramBoolean;
  }
  
  public boolean Touch_Check(float paramFloat1, float paramFloat2)
  {
    boolean bool2 = false;
    boolean bool1;
    if (this.iSortOfBtn < 3)
    {
      bool1 = bool2;
      if (this.bit_img != null)
      {
        if ((paramFloat1 < this.position_x * Global.GetInstance().dnst_w - this.bit_img.getWidth() * this.position_ax * 3.0F) || (paramFloat2 < this.position_y * Global.GetInstance().dnst_h - this.bit_img.getHeight() * this.position_ay * 2.0F) || (paramFloat1 > this.position_x * Global.GetInstance().dnst_w - this.bit_img.getWidth() * (this.position_ax - 1.0F) * 3.0F) || (paramFloat2 > this.position_y * Global.GetInstance().dnst_h - this.bit_img.getHeight() * (this.position_ay - 1.0F) * 2.0F)) {
          break label159;
        }
        bool1 = true;
      }
    }
    label159:
    do
    {
      do
      {
        return bool1;
        this.DownAndUp = false;
        Touch_RangeOut();
        return false;
        bool1 = bool2;
      } while (this.iSortOfBtn != 3);
      bool1 = bool2;
    } while (this.bit_img == null);
    if ((paramFloat1 >= this.position_x * Global.GetInstance().dnst_w - this.bit_img.getWidth() * this.position_ax * 1.5F) && (paramFloat2 >= this.position_y * Global.GetInstance().dnst_h - this.bit_img.getHeight() * this.position_ay * 2.0F) && (paramFloat1 <= this.position_x * Global.GetInstance().dnst_w - this.bit_img.getWidth() * (this.position_ax - 1.0F) * 1.5F) && (paramFloat2 <= this.position_y * Global.GetInstance().dnst_h - this.bit_img.getHeight() * (this.position_ay - 1.0F) * 2.0F)) {
      return true;
    }
    this.DownAndUp = false;
    Touch_RangeOut();
    return false;
  }
  
  public void Touch_Down(float paramFloat1, float paramFloat2, MainDirector paramMainDirector)
  {
    if (this.bIsActive) {
      this.paint.setAlpha(100);
    }
  }
  
  public void Touch_DownAndUp(float paramFloat1, float paramFloat2, MainDirector paramMainDirector)
  {
    if (this.bIsActive) {
      this.paint.setAlpha(255);
    }
    switch (this.iSortOfBtn)
    {
    default: 
      return;
    case 0: 
      paramMainDirector = GlobalSaveData.GetInstance();
      paramMainDirector.iSize += 1;
      paramMainDirector = GlobalSaveData.GetInstance();
      paramMainDirector.iSize %= 4;
      GlobalSaveData.GetInstance().Save();
      return;
    case 1: 
      paramMainDirector = GlobalSaveData.GetInstance();
      paramMainDirector.iActivity += 1;
      paramMainDirector = GlobalSaveData.GetInstance();
      paramMainDirector.iActivity %= 4;
      GlobalSaveData.GetInstance().Save();
      return;
    case 2: 
      paramMainDirector = GlobalSaveData.GetInstance();
      paramMainDirector.iGravity += 1;
      paramMainDirector = GlobalSaveData.GetInstance();
      paramMainDirector.iGravity %= 4;
      GlobalSaveData.GetInstance().Save();
      return;
    }
    paramMainDirector.m_Scene01.m_Layer01.visible = false;
    paramMainDirector.m_Scene01.m_Layer02.visible = false;
    paramMainDirector.m_Scene01.m_Layer03.visible = false;
    paramMainDirector.m_Scene01.m_Layer04.visible = false;
    paramMainDirector.m_Scene01.m_Layer04.spd_Next.SetAllVariableFree();
    paramMainDirector.m_Scene01.m_Layer04.bTxtChanger = false;
    paramMainDirector.m_Scene01.m_Layer04.visible = true;
    if (GlobalSaveData.GetInstance().iLanguage == 0)
    {
      Toast.makeText(Global.GetInstance().m_activity.getApplicationContext(), "This is a optional file, so you don't need to make it.", 0).show();
      return;
    }
    Toast.makeText(Global.GetInstance().m_activity.getApplicationContext(), "해당 파일은 선택사항입니다. 꼭 만드실 필요는 없습니다.", 0).show();
  }
  
  public void Touch_RangeOut()
  {
    this.paint.setAlpha(255);
  }
}


/* Location:           D:\Tool\AndroidKiller_v1.3.1\projects\petdesigner\ProjectSrc\classes-dex2jar.jar
 * Qualified Name:     scene01_Home.Sprite_ButtonOption
 * JD-Core Version:    0.7.0.1
 */